Health Cloud Administration System API - Implementation Template
Developer guide
Administration Dev Guide
The US-Core Administratoin application uses the following DataWeave modules to map between HealthCloud and FHIR formats.
| Module | Description |
|---|---|
| PatientFHIRTools | PatientFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| PatientRequest | This module defines functions needed to convert a FHIR Patient resource into it's representation within Health Cloud. |
| LocationFHIRTools | LocationFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| LocationRequest | This module defines functions needed to convert a FHIR Location resource into it's representation within Health Cloud. |
| PractitionerFHIRTools | PractitionerFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| PractitionerRequest | This module defines functions needed to convert a FHIR Practitioner resource into it's representation within Health Cloud. |
| OrganizationFHIRTools | OrganizationFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| OrganizationRequest | This module defines functions needed to convert a FHIR Organization resource into it's representation within Health Cloud. |
| encounterfhirtools | encounterFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| encounterRequest | This module defines functions needed to convert a FHIR Encounter resource into it's representation within Health Cloud. |
| PractitionerRoleFHIRTools | PractitionerRoleFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| PractitionerRoleRequest | This module defines functions needed to convert a FHIR PractitionerRole resource into it's representation within Health Cloud. |
| RelatedPersonFHIRTools | RelatedPersonFHIRTools dataweave library contains functions used for converting HealthCloud data into FHIR format. |
| RelatedPersonRequest | This module defines functions needed to convert a FHIR RelatedPerson resource into it's representation within Health Cloud. |
| Util | A library with needed dataweave utility functions. |
PatientFHIRTools
PatientFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Patient/PatientFHIRTools.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getPatientResponse (acc: Object, idTypeMap, personNames, contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap)
Generates the FHIR response with the provided Account and contact Accounts.
param
accis the Account object to map.
paramidTypeMapis a map of HC Ids to FHIR identifier codes.
parampersonNamesis an optional array of HC PersonName objects to map.
paramcontactAccountsis an optional array of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
paramcontactContactRelationsis a list of contact relation objects.
paramrelationRoleMapthe role relationship map.
return A FHIR formatted Patient object.
fun getPatientNames (personNames)
Gets the patient names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getPatientCommunicationContactPoints (cp)
Gets the patient communication contact point object for the provided contact point provided.
param
cpis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getPatientIdentifiers (idTypeMap, ids)
Gets the patient identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeMapis a map of HC Ids to FHIR identifier codes.
paramidsis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getPatientAddresses (addresses)
Get the patient addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getPatientCommunication (acc)
Get the patient preferred language from the provided HC account object and returns an array of FHIR formatted language objects.
param
accis an HC account object.
return An array of FHIR formatted language objects.
fun getPatientContacts (contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap)
Gets the patient contact-contact relations as an array of FHIR objects.
param
contactAccountsis an optional list of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
paramcontactContactRelationsis a list of contact relation objects.
paramrelationRoleMapthe role relationship map.
return An array of contact FHIR objects.
fun getPatientRelationRole (contactContactRelations, id, relationRoleMap)
Gets the patient relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
paramrelationRoleMapthe role relationship map.
return A code for the patient relation role.
fun getPatientRelationRoleRecord (contactContactRelations, id)
Gets the patient relation role record with the provided list of contact relations and the Id.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
return A Salesforce role Id for the provided data.
fun getPatientUsCoreExtensions (ct)
Gets the us-core Extensions for Patient with the provided Contact object.
param
ctis a HealthCloud Contact object.
return A FHIR formatted extension list.
fun getPatientUsCoreExtensionRace (ct)
Gets the us-core Extension for Patient race with the provided Contact object.
param
ctis a HealthCloud Contact object.
return A FHIR formatted race extension object.
fun getPatientUsCoreExtensionEthnicity (ct)
Gets the us-core Extension for Patient ethnicity with the provided Contact object.
param
ctis a HealthCloud Contact object.
return A FHIR formatted ethnicity extension object.
fun getPatientUsCoreExtensionBirthSex (ct)
Gets the us-core Extension for Patient birth sex with the provided Contact object.
param
ctis a HealthCloud Contact object.
return A FHIR formatted birth sex extension object.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
PatientRequest
This module defines functions needed to convert a
FHIR Patient resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Patient/PatientRequest.dwl
Functions
fun getPatientPersonAccount (fhirObj, recordType)
Converts the provided Patient FHIR object to the HealthCloud PersonAccount request object.
param
fhirObjis a FHIR Patient object.
paramrecordTypeis an ID with the PersonAccount record ID to use.
return A HealthCloud PersonAccount request object.
fun getPatientAccount (fhirObj)
Converts the provided Patient FHIR object to the HealthCloud Account object.
param
fhirObjis a FHIR Patient object.
return A HealthCloud Account object.
fun getPatientContact (fhirObj)
Converts the provided Patient FHIR object to the HealthCloud Contact object.
param
fhirObjis a FHIR Patient object.
return A HealthCloud Contact object.
fun getPatientPersonName (fhirObj, accountId)
Converts the provided Patient FHIR object to the HealthCloud PersonName object list.
param
fhirObjis a FHIR Patient object.
paramaccountIdis a string with the Account Id.
return A HealthCloud PersonName object list.
fun getPatientContactPoint (telecom, accountId)
Converts the provided Patient FHIR object to the HealthCloud ContactPoint object list.
param
telecomis a list of Patient telecom objects.
paramaccountIdis a string with the Account Id.
return A HealthCloud ContactPoint object list.
fun getPatientIdentifier (fhirObj, idTypeIdMap, accountId)
Converts the provided Patient FHIR object to the HealthCloud Identifier object list.
param
fhirObjis a FHIR Patient object.
paramidTypeIdMapis an object with the IdType code -> IdType Id from HealthCloud map.
paramaccountIdis a string with the Account Id.
return A HealthCloud Identifier object list.
fun getIdentifierType (identifierObj)
Gets the identifier type. It first looks for the codeable concept code value, and if that's not found it then looks for the text value.
param
identifierObjis an identifier object to get the type for.
return A string with the type or Undefined.
fun getPatientContactPointAddress (fhirObj, accountId)
Converts the provided Patient FHIR object to the HealthCloud ContactPoint Address objectlist .
param
fhirObjis a FHIR Patient object.
paramaccountIdis a string with the Account Id.
return A HealthCloud ContactPoint Address object list.
fun getPatientPersonLanguage (fhirObj, accountId)
Converts the provided Patient FHIR object to the HealthCloud PersonLanguage object list.
param
fhirObjis a FHIR Patient object.
paramaccountIdis a string with the Account Id.
return A HealthCloud PersonLanguage object list.
fun getPatientExtensions (fhirObj)
Converts the provided Patient FHIR object and returns the patient ethnicity and race us-core extensions.
param
fhirObjis a FHIR Patient object.
return The HealthCloud ethnicity and race fields for Contact object.
fun getPatientRace (ext)
Converts the provided FHIR Extension object and returns the patient race us-core extensions.
param
extis a us-core-race extension object.
return An object with the extension fields for HC Contact.
fun getPatientEthnicity (ext)
Converts the provided FHIR Extension object and returns the patient ethnicity us-core extensions.
param
extis a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.
fun getPatientBirthSex (ext)
Converts the provided FHIR Extension object and returns the patient birth sex us-core extension.
param
extis a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.
fun getPatientEthnicityOmbCategory (items)
Converts the provided FHIR Extension list of Ethnicity OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientEthnicityDetailed (items)
Converts the provided FHIR Extension list of Ethnicity Detailed objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientEthnicityText (items)
Converts the provided FHIR Extension list of Ethnicity Text objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientRaceOmbCategory (items)
Converts the provided FHIR Extension list of Race OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientRaceDetailed (items)
Converts the provided FHIR Extension list of Race Detailed objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientRaceText (items)
Converts the provided FHIR Extension list of Race Text objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientContactsPersonAccount (method, fhirObj, index, recordType)
Converts the provided Contact FHIR object to the HealthCloud Patient Contact Account request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramindexis a string with the contact reference index to use.
paramrecordTypeis an ID with the PersonAccount record
return A composite HealthCloud contact Account request.
fun getPatientContactsContact (fhirObj)
Converts the provided Contact FHIR object to the HealthCloud Patient Contacts Contact.
param
fhirObjis a FHIR Contact object.
return A composite HealthCloud contact Contact.
fun getPatientContactsPersonName (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the HealthCloud Patient Contacts PersonName composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramctIndexis the index of the contact in the loop.
paramaccountIdis the Id of the parent Account record.
return A composite HealthCloud contact PersonName request.
fun getPatientContactsContactPointTelecom (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the HealthCloud Patient Contacts telecom composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramctIndexis the index of the contact in the loop.
paramaccountIdis the Id of the parent Account record.
return A composite HealthCloud contact telecom request.
fun getPatientContactsContactPointAddress (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the HealthCloud Patient Contacts address composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramctIndexis the index of the contact in the loop.
paramaccountIdis the Id of the parent Account record.
return A composite HealthCloud contact address request.
fun getPatientContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, contactId, ctIndex)
Converts the provided Contact FHIR object to the HealthCloud Patient contact-to-contact relationship of composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramrelationRoleMapthe role relationship map.
parammainContactIdis a string with the main Contact Id.
paramcontactIdis a string with the Contact Id.
paramctIndexis the index of the contact in the loop.
return A composite HealthCloud contact-to-contact relationship request.
LocationFHIRTools
LocationFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Location/LocationFHIRTools.dwl
Functions
fun getLocationResponse (loc: Object, locationObj, identifierObj, codeSet, IdTypeIdMap, parentFacilityAccountId)
Generates the location response object in FHIR format with the provided location and associated objects queried from Health Cloud.
param
locis the HC Account location object.
paramlocationObjis the HC Location object.
paramidentifierObjis the HC Identifier object list.
paramcodeSetis the HC CodeSet object.
paramIdTypeIdMapis a map with the Id types.
paramparentFacilityAccountIdis a String with the parent facility Account Id if present or null if not provided.
return A FHIR formatted Location object.
fun getLocationType (codeSet)
Gets the Location type object with the provided codeSet HealthCloud object.
param
codeSetis a HealthCloud CodeSet object.
return A FHIR Location type object.
fun getLocationPhysicalType (facility)
Gets the Location physicalType object with the provided HealthcareFacility HealthCloud object.
param
facilityis a HealthCloud HealthcareFacility object.
return A FHIR Location physicalType object.
fun getLocationIdentifier (idList, idTypeIdMap)
Gets the Location identifier object list with the provided Identifier HealthCloud object list.
param
idListis a HealthCloud Identifier object list.
paramIdTypeIdMapis a map with the Id types.
return A FHIR Location identifier object.
fun getLoationTelecom (loc: Object)
Gets the Location telecom objects with the provided Location HealthCloud object.
param
locis the HC Account location object.
return A list of FHIR Location telecom objects.
fun getLoationAddress (loc: Object)
Gets the Location address objects with the provided Location HealthCloud object.
param
locis the HC Account location object.
return A list of FHIR Location address objects.
fun getLoationManagingOrganization (loc: Object)
Gets the Location managing organization object with the provided Location HealthCloud object.
param
locis the HC Account location object.
return A FHIR reference to managing organization.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
LocationRequest
This module defines functions needed to convert a
FHIR Location resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Location/LocationRequest.dwl
Functions
fun getLocationAccount (fhirObj)
Converts the provided Location FHIR object to the HealthCloud Account object.
param
fhirObjis a FHIR Location object.
return A HealthCloud Account object.
fun getLocationLocation (fhirObj)
Converts the provided Location FHIR object to the HealthCloud Location object.
param
fhirObjis a FHIR Location object. Id or null if not present.
return A HealthCloud Location object.
fun getLocationHealthcareFacility (fhirObj, facilityTypeId, parentFacilityId)
Converts the provided Location FHIR object to the HealthCloud HealthcareFacility object.
param
fhirObjis a FHIR Location object.
paramfacilityTypeIdis the Id of the CodeSetBundle to set.
paramparentFacilityIdis a String with the parent HealthcareFacility Id or null if not present.
return A HealthCloud HealthcareFacility object.
fun getLocationHealthcareFacility (fhirObj, facilityTypeId, parentFacilityId, create)
Converts the provided Location FHIR object to the HealthCloud HealthcareFacility object.
param
fhirObjis a FHIR Location object.
paramfacilityTypeIdis the Id of the CodeSetBundle to set.
paramcreateis a boolean with true to create and false to update.
paramparentFacilityIdis a String with the parent HealthcareFacility Id or null if not present.
return A HealthCloud HealthcareFacility object.
fun getLocationIdentifier (fhirObj, idTypeIdMap)
Converts the provided Location FHIR object to the HealthCloud Identifier object.
param
fhirObjis a FHIR Location object.
paramidTypeIdMapis an object with the IdType code -> IdType Id from HealthCloud map.
return A HealthCloud Identifier object.
fun getLocationIdentifier (fhirObj, idTypeIdMap, healthcareFacilityId)
Converts the provided Location FHIR object to the HealthCloud Identifier object.
param
fhirObjis a FHIR Location object.
paramidTypeIdMapis an object with the IdType code -> IdType Id from HealthCloud map.
paramhealthcareFacilityIdis the HealthcareFacility Id to use as the parent record Id.
return A HealthCloud Identifier object.
fun getLocationContactPoint (telecom)
Converts the provided Location FHIR object to the HealthCloud ContactPoint object list.
param
telecomis a list of Location telecom objects.
return A HealthCloud ContactPoint object list.
fun getLocationContactPoint (telecom, accountId)
Converts the provided Location FHIR object to the HealthCloud ContactPoint object list.
param
telecomis a list of Location telecom objects.
paramaccountIdis a String with the Account Id.
return A HealthCloud ContactPoint object list.
fun getLocationContactPointAddress (fhirObj)
Converts the provided Location FHIR object to the HealthCloud ContactPoint Address object .
param
fhirObjis a FHIR Location object.
return A HealthCloud ContactPoint Address object.
fun getLocationContactPointAddress (fhirObj, accountId)
Converts the provided Location FHIR object to the HealthCloud ContactPoint Address object .
param
fhirObjis a FHIR Location object.
paramaccountIdis a String with the Account Id.
return A HealthCloud ContactPoint Address object.
fun getLocationAccountAccountRelation (fhirObj, relationRoleMap)
Converts the provided Location FHIR object to the HealthCloud AccountAccountRelation object .
param
fhirObjis a FHIR Location object.
paramrelationRoleMapthe role relationship map.
return A HealthCloud ContactPoint AccountAccountRelation object.
fun getLocationAccountAccountRelation (fhirObj, relationRoleMap, accountId)
Converts the provided Location FHIR object to the HealthCloud AccountAccountRelation object .
param
fhirObjis a FHIR Location object.
paramrelationRoleMapthe role relationship map.
paramaccountIdis a String with the Account Id.
return A HealthCloud ContactPoint AccountAccountRelation object.
PractitionerFHIRTools
PractitionerFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Practitioner/PractitionerFHIRTools.dwl
Functions
fun getPractitionerResponse (acc: Object, idTypeMap, personNames, personLanguages)
Generates the FHIR response with the provided Account and contact Accounts.
param
accis the Account object to map.
paramidTypeMapis a map of HC Ids to FHIR identifier codes.
parampersonNamesis an optional array of HC PersonName objects to map.
parampersonLanguagesis a list of HC language to map.
return A FHIR formatted Practitioner object.
fun getPractitionerResponse (acc: Object, idTypeMap, personNames, contactAccounts, contactPersonNames)
Generates the FHIR response with the provided Account and contact Accounts.
param
accis the Account object to map.
paramidTypeMapis a map of HC Ids to FHIR identifier codes.
parampersonNamesis an optional array of HC PersonName objects to map.
paramcontactAccountsis an optional array of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
return A FHIR formatted Practitioner object.
fun getQualifications (boardCertifications)
Gets the Qualifications with the provided list of Boar certifications
param
boardCertificationsis a list of HC boardCertifications to map.
return a list of Qualifications in FHIR format.
fun getCommunicationLangugaes (personLanguages)
Gets the communication languages with the provided list of person languages.
param
personLanguagesis a list of HC language to map.
return a list of communication languages in FHIR format.
fun getPractitionerNames (personNames)
Gets the Practitioner names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getPractitionerCommunicationContactPoints (cp)
Gets the Practitioner communication contact point object for the provided contact point provided.
param
cpis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getPractitionerIdentifiers (idTypeMap, ids)
Gets the Practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeMapis a map of HC Ids to FHIR identifier codes.
paramidsis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getPractitionerAddresses (addresses)
Get the Practitioner addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getPractitionerContacts (contactAccounts, contactPersonNames)
Gets the Practitioner contact-contact relations as an array of FHIR objects.
param
contactAccountsis an optional list of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
return An array of contact FHIR objects.
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
objis an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arris an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arris an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
objis an object.
return An object with null values removed.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
fun getPractitionerIdentifier (identifiers, idTypeMap)
Gets the practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
identifiersis an array of HC identifier objects.
paramidTypeMapis a map of HC Ids to FHIR identifier codes.
return An array of FHIR Identifier objects.
PractitionerRequest
This module defines functions needed to convert a
FHIR Practitioner resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Practitioner/PractitionerRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getPractitionerAccount (fhirObj, recordTypeId)
Converts the provided Practitioner FHIR object to the HealthCloud Account object.
param
fhirObjis a FHIR Practitioner object.
paramrecordTypeIdis a String with the record type Id to use.
return A HealthCloud Account object.
fun getPractitionerIdentifier (method, accountId, identifierObj, idTypeIdMap)
Converts the provided Practitioner FHIR object to the HealthCloud Identifier object.
param
methodis a string with the method value.
paramaccountIdis a string with the Account Id.
paramidentifierObjis a FHIR Practitioner identifier object.
paramidTypeIdMapis a map with the Id type Ids to use.
return A HealthCloud Identifier object.
fun getPractitionerContact (fhirObj)
Converts the provided Practitioner FHIR object to the HealthCloud Contact object.
param
fhirObjis a FHIR Practitioner object.
return A HealthCloud Contact object.
fun getPractitionerPersonName (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the HealthCloud PersonName object list.
param
fhirObjis a FHIR Practitioner object.
paramaccountIdis a string with the Account Id.
return A HealthCloud PersonName object list.
fun getPractitionerContactPoint (telecom, accountId)
Converts the provided Practitioner FHIR object to the HealthCloud ContactPoint object list.
param
telecomis a list of Practitioner telecom objects.
paramaccountIdis a string with the Account Id.
return A HealthCloud ContactPoint object list.
fun getPractitionerContactPointAddress (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the HealthCloud ContactPoint Address object list .
param
fhirObjis a FHIR Practitioner object.
paramaccountIdis a string with the Account Id.
return A HealthCloud ContactPoint Address object list.
fun getPractitionerPersonLanguage (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the HealthCloud PersonLanguage object list.
param
fhirObjis a FHIR Practitioner object.
paramaccountIdis a string with the Account Id.
return A HealthCloud PersonLanguage object list.
fun getPractitionerContact (fhirObj)
Converts the provided Practitioner FHIR object to the HealthCloud Contact object.
param
fhirObjis a FHIR Practitioner object.
return A HealthCloud Contact object.
fun formatName (obj)
Gets the trimmed concatenated name with the provided name object.
param
objis the name object to format.
return A formatted name string with 'First Last'.
fun getPractitionerHealthcareProvider (fhirObj, contactResp)
Converts the provided Practitioner FHIR object to the HealthCloud HealthcareProvider object.
param
fhirObjis a FHIR Practitioner object.
paramcontactRespis contactResponse Object in the previous flows
return A HealthCloud HealthcareProvider object.
fun getBoardCertification (fhirObj, contactResp)
Converts the provided Practitioner FHIR object to the HealthCloud BoardCertification object.
param
fhirObjis a FHIR Practitioner object.
paramcontactRespis contactResponse Object in the previous flows
return A HealthCloud BoardCertification object.
OrganizationFHIRTools
OrganizationFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Organization/OrganizationFHIRTools.dwl
Functions
fun getOrganizationResponse (org: Object, idTypeMap, contactAccounts, contactPersonNames)
Gets the organization response object with the provided Organization object.
param
orgis a Healthcloud Organization object.
paramidTypeMapis a Id type map to use.
paramcontactAccountsis a list of Contact accounts.
paramcontactPersonNamesis a list of contact PersonName objects.
return A FHIR formatted Organization object.
fun getOrgContactsNames (personNames)
Gets the Organization Contacts names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getOrgIdentifiers (identifiers, idTypeMap)
Gets the organization identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
identifieris an array of HC identifier objects.
paramidTypeMapis a map of HC Ids to FHIR identifier codes.
return An array of FHIR Identifier objects.
fun getOrgCommunicationContactPoints (contactPoints)
Gets the Organization communication contact point object for the provided contact point provided.
param
contactPointsis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getOrgContactPointAddresses (addresses)
Get the Organization addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getOrgContacts (contactAccounts, contactPersonNames)
Gets the organization account-contact relations as an array of FHIR objects.
param
contactAccountsis an optional list of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
return An array of contact FHIR objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
OrganizationRequest
This module defines functions needed to convert a
FHIR Organization resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Organization/OrganizationRequest.dwl
Functions
fun getOrganizationAccount (fhirObj)
Converts the provided Organization FHIR object to the HealthCloud Account object.
param
fhirObjis a FHIR Organization object.
return A HealthCloud Account object.
fun getOrganizationIdentifier (method, identifierObj, idTypeIdMap)
Converts the provided Organization FHIR object to the HealthCloud Identifier object.
param
methodis a String with the HTTP method to use.
paramidentifierObjis a FHIR Organization identifier object.
paramidTypeIdMapis a map with the Id type Ids to use.
return A HealthCloud Identifier object.
fun getOrganizationIdentifier (method, identifierObj, idTypeIdMap, accountId)
Converts the provided Organization FHIR object to the HealthCloud Identifier object.
param
methodis a String with the HTTP method to use.
paramidentifierObjis a FHIR Organization identifier object.
paramidTypeIdMapis a map with the Id type Ids to use.
paramaccountIdis a String with the Account Id to use.
return A HealthCloud Identifier object.
fun getOrganizationContactPointAddress (method, fhirObj)
Converts the provided Organization FHIR object to the HealthCloud ContactPoint Address object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
return A HealthCloud ContactPoint Address object list.
fun getOrganizationContactPointAddress (method, fhirObj, accountId)
Converts the provided Organization FHIR object to the HealthCloud ContactPoint Address object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
paramaccountIdis a String with the Account Id to use.
return A HealthCloud ContactPoint Address object list.
fun getOrganizationContact (method, fhirObj)
Converts the provided Organization FHIR object to the HealthCloud ContactPoint object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
return A HealthCloud ContactPoint object list.
fun getOrganizationContact (method, fhirObj, accountId)
Converts the provided Organization FHIR object to the HealthCloud ContactPoint object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
paramaccountIdis a String with the Account Id to use.
return A HealthCloud ContactPoint object list.
fun getOrganizationContactAccount (method, contactObj, recordType)
Converts the provided Organization FHIR object to the HealthCloud Contact object.
param
methodis a String with the HTTP method to use.
paramcontactObjis a FHIR Organization contact object.
paramrecordTypeis a person account type.
return A HealthCloud Contact object.
fun getContactsPersonName (method, fhirObj)
Converts the provided Organization FHIR object to the HealthCloud PersonName object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization contact object.
return A HealthCloud PersonName object list.
fun getContactsContactPointAddress (method, fhirObj)
Converts the provided Organization FHIR object to the HealthCloud ContactPoint Address object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
return A HealthCloud ContactPoint Address object list.
fun getContactsContact (method, fhirObj)
Converts the provided Organization FHIR object to the HealthCloud ContactPoint object list.
param
methodis a String with the HTTP method to use.
paramtelecomis a list of Organization contacts telecom objects.
return A HealthCloud ContactPoint object list.
fun getAccountContactRelation (method, accountId, contactIds)
Converts the provided Organization FHIR object to the HealthCloud AccountContact Relation object list.
param
methodis a String with the HTTP method to use.
paramaccountIdis Organization account Id.
paramcontactIdsis organization contacts contact Ids.
return A HealthCloud ContactPoint object list.
encounterfhirtools
encounterFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Encounter/encounterfhirtools.dwl
Functions
fun getEncounterResponse (encounterRLU)
Generates the FHIR response with the provided Encounter Object.
param
encounterRLUis the Encounter object to map.
return A HealthCloud ClientEncounter response.
fun getLocation (locations)
Creates a list of location references with the provided location list.
param
locationsis a list of clinical encouter facilities.
return A list of location references.
fun getParticipant (participant)
Gets the Participant in FHIR format with the provided ClinicalEncounterProvider objects.
param
participantis a list of HC ClinicalEncounterProvider objects.
return A list of FHIR formatted participant response.
fun getReasonCode (ReasonCodeIdCodeSetBundle)
Gets the reasonCode in FHIR format with the provided ClinicalEncounterReason objects.
param
ReasonCodeIdCodeSetBundleis a list of HC CodeSetBundle objects related to reasonCode.
return A list of FHIR formatted reasonCode response.
fun getHospitalization (encounter)
Gets the hospitalization related data in FHIR format with the provided encounter objects.
param
encounteris the ClinicalEncounterReason object.
return A list of FHIR formatted hospitalization response.
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
return A string with the entry URL.
encounterRequest
This module defines functions needed to convert a
FHIR Encounter resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Encounter/encounterRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getEncounterUpsert (fhirObj, codeSetBundleList, create)
Converts the provided Encounter FHIR object to the HealthCloud Encounter object.
param
fhirObjis a FHIR Encounter object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Encounter object
paramcreateis a boolean with true for a create and false for an update.
return HealthCloud Encounter upsert fields.
fun getEncounterUpdate (fhirObj, codeSetBundleList, create)
Converts the provided Encounter FHIR object to the HealthCloud Encounter object.
param
fhirObjis a FHIR Encounter object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Encounter object
paramcreateis a boolean with true for a create and false for an update.
return HealthCloud Encounter update fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided Encounter FHIR object to the HealthCloud CodeSet object.
param
codeSetListis the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Encounter FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetListis the list of CodeSetBundle object.
parambundleTypeis for defining the CodeSetBundle type.
paramnameis for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.
fun getIdentifierUpsert (identifier, encounterId, typeId)
Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterIdentifier object.
param
identifieris the list of ClinicalEncounterIdentifier object.
paramencounterIdis the associated encounter Id.
paramtypeIdis a String with the Id type Id to set.
return HealthCloud ClinicalEncounterIdentifier upsert fields.
fun getParticipantUpsert (participant, encounterId)
Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterProvider object.
param
participantis the list of ClinicalEncounterProvider object.
paramencounterIdis the associated encounter Id.
return HealthCloud ClinicalEncounterProvider upsert fields.
fun getLocationUpsert (location, encounterId)
Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterFacility object.
param
locationis the list of ClinicalEncounterFacility object.
paramencounterIdis the associated encounter Id.
return HealthCloud ClinicalEncounterFacility upsert fields.
fun getReasonCodeUpsert (reasonCode, encounterId)
Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterReason object.
param
reasonCodeis the list of ClinicalEncounterReason object.
paramencounterIdis the associated encounter Id.
return HealthCloud ClinicalEncounterReason upsert fields.
PractitionerRoleFHIRTools
PractitionerRoleFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/PractitionerRole/PractitionerRoleFHIRTools.dwl
Functions
fun getPractitionerRoleResponse (prole: Object, careProviderFacilitySpecialty, practitioner, specialty, location, idTypeMap)
Generates the practitionerrole response object in FHIR format with the provided practitionerrole object queried from Health Cloud.
param
proleis the PractitionerRole object to map.
paramcareProviderFacilitySpecialtyis the care provider facility specialty.
parampractitioneris a Practitioner object to map.
paramspecialtyis a Specialty object to map.
paramlocationis a Location object to map.
paramidTypeMapis a map with the Id type Ids to use.
return A FHIR formatted PractitionerRole object.
fun getIdentifier (prole, idTypeMap)
Gets the practitionerrole identifiers and returns a list of FHIR Identifier objects.
param
prolean array of HC Identifier objects.
paramidTypeMapis a map with the Id type Ids to use.
return An array of FHIR Identifier objects.
fun getPractitioner (prole: Object, practitioner)
Gets the practitioner object with the provided practitionerrole object and returns null if not found.
param
proleis the PractitionerRole object to map.
parampractitioneris a Practitioner object.
return A FHIR formatted Practitioner object.
fun getLocation (prole: Object, location)
Gets the location object with the provided practitionerrole object and returns null if not found.
param
proleis the PractitionerRole object to map.
paramlocationis an array of HC Location objects.
return An array of FHIR formatted Location objects.
fun getCode (careProviderFacilitySpecialty)
Gets the code object with the provided practitionerrole object and returns null if not found.
param
careProviderFacilitySpecialtyis an array of HC Code objects.
return An array of FHIR formatted Code objects.
fun getspecialty (specialty)
Gets the specialty object with the provided practitionerrole object and returns null if not found.
param
specialtyis an array of HC Specialty objects.
return An array of FHIR formatted Specialty objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
PractitionerRoleRequest
This module defines functions needed to convert a
FHIR PractitionerRole resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/PractitionerRole/PractitionerRoleRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getPractitionerRoleAccount (fhirObj)
Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.
param
fhirObjis a FHIR PractitionerRole healthcarePractitionerFacility object.
return A HealthCloud HealthcarePractitionerFacility object.
fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdMap)
Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR PractitionerRole identifier object.
return A HealthCloud Identifier object.
fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdMap, healthcareFacilityId)
Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR PractitionerRole identifier object.
paramidTypeIdMapis a map with the id types.
paramhealthcareFacilityIdis a String with the HealthcareFacility Id.
return An object with a list of HealthCloud Identifier objects.
fun getCareProviderFacilitySpecialty (method, fhirObj)
Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.
param
fhirObjis a FHIR PractitionerRole careProviderFacilitySpecialty object.
return A HealthCloud CareProviderFacilitySpecialty object.
fun getCareProviderFacilitySpecialty (method, fhirObj, healthcareFacilityId)
Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.
param
methodis a String with the method to use.
paramfhirObjis a FHIR PractitionerRole careProviderFacilitySpecialty object.
paramhealthcareFacilityIdis a String with the HealthcareFacility Id.
return An object with a list of HealthCloud CareProviderFacilitySpecialty objects.
RelatedPersonFHIRTools
RelatedPersonFHIRTools dataweave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/relatedperson/RelatedPersonFHIRTools.dwl
Functions
fun getRelatedPersonResponse (acc: Object, idTypeMap, personNames, personLanguages, contactAccountIds, contactContactRelations, relationRoleMap)
Generates the FHIR response with the provided Account and contact Accounts.
param
accis the Account object to map.
paramidTypeMapis a map of HC Ids to FHIR identifier codes.
parampersonNamesis an optional array of HC PersonName objects to map.
parampersonLanguagesis a list of person languages to map.
paramcontactAccountIdsis a list of contact account Ids to use a references.
paramcontactContactRelationsis a list of contact relations to map.
paramrelationRoleMapis a map of relation roles to use.
return A FHIR formatted RelatedPerson object.
fun getRelatedPersonNames (personNames)
Gets the RelatedPerson names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getRelatedPersonCommunicationContactPoints (cp)
Gets the RelatedPerson communication contact point object for the provided contact point provided.
param
cpis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getRelatedPersonIdentifiers (idTypeMap, ids)
Gets the RelatedPerson identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeMapis a map of HC Ids to FHIR identifier codes.
paramidsis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getRelatedPersonAddresses (addresses)
Get the RelatedPerson addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getCommunicationLangugaes (personLanguages)
Maps the communication languages with the provided list of person languages.
param
personLanguagesis a list of languages to map.
return a FHIR formatted list of communication languages.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
fun getRelatedPersonRelationRole (contactContactRelations, id, relationRoleMap)
Gets the relatedperson relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
paramrelationRoleMapthe role relationship map.
return A code for the relatedperson relation role.
fun getRelatedPersonRelationRoleRecord (contactContactRelations, id)
Gets the relatedperson relation role record with the provided list of contact relations and the Id.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
return A Salesforce role Id for the provided data.
RelatedPersonRequest
This module defines functions needed to convert a
FHIR RelatedPerson resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/relatedperson/RelatedPersonRequest.dwl
Functions
fun getRelatedPersonAccount (fhirObj, recordTypeId)
Converts the provided RelatedPerson FHIR object to the HealthCloud Account object.
param
fhirObjis a FHIR RelatedPerson object.
paramrecordTypeIdis a String with the record type Id to set.
return A HealthCloud Account object.
fun getRelatedPersonContact (fhirObj)
Converts the provided RelatedPerson FHIR object to the HealthCloud Contact object.
param
fhirObjis a FHIR RelatedPerson object.
return A HealthCloud Contact object.
fun getRelatedPersonPersonName (fhirObj)
Converts the provided RelatedPerson FHIR object to the HealthCloud PersonName object list.
param
fhirObjis a FHIR RelatedPerson object.
return A HealthCloud PersonName object list.
fun getRelatedPersonPersonName (fhirObj, accountId)
Converts the provided RelatedPerson FHIR object to the HealthCloud PersonName object list.
param
fhirObjis a FHIR RelatedPerson object.
paramaccountIdis a String with the Account Id.
return A HealthCloud PersonName object list.
fun getRelatedPersonContactPoint (telecom)
Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint object list.
param
telecomis a list of RelatedPerson telecom objects.
return A HealthCloud ContactPoint object list.
fun getRelatedPersonContactPoint (telecom, accountId)
Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint object list.
param
telecomis a list of RelatedPerson telecom objects.
paramaccountIdis a String with the Account Id.
return A HealthCloud ContactPoint object list.
fun getRelatedPersonContactPointAddress (fhirObj)
Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint Address object list .
param
fhirObjis a FHIR RelatedPerson object.
return A HealthCloud ContactPoint Address object list.
fun getRelatedPersonContactPointAddress (fhirObj, accountId)
Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint Address object list .
param
fhirObjis a FHIR RelatedPerson object.
paramaccountIdis a String with the Account Id.
return A HealthCloud ContactPoint Address object list.
fun getRelatedPersonPersonLanguage (fhirObj)
Converts the provided RelatedPerson FHIR object to the HealthCloud PersonLanguage object list.
param
fhirObjis a FHIR RelatedPerson object.
return A HealthCloud PersonLanguage object list.
fun getRelatedPersonPersonLanguage (fhirObj, accountId)
Converts the provided RelatedPerson FHIR object to the HealthCloud PersonLanguage object list.
param
fhirObjis a FHIR RelatedPerson object.
paramaccountIdis a String with the Account Id.
return A HealthCloud PersonLanguage object list.
fun getRelatedPersonContact (fhirObj)
Converts the provided RelatedPerson FHIR object to the HealthCloud Contact object.
param
fhirObjis a FHIR Patient object.
return A HealthCloud Contact object.
fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdMap)
Converts the provided RelatedPerson FHIR object to the HealthCloud Identifier object.
param
methodis a string with the method to use.
paramidentifierObjis a FHIR Patient identifier object.
paramidTypeIdMapis an object with the IdType code -> IdType Id from HealthCloud map.
return A HealthCloud Identifier object.
fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdMap, accountId)
Converts the provided RelatedPerson FHIR object to the HealthCloud Identifier object.
param
methodis a string with the method to use.
paramidentifierObjis a FHIR Patient identifier object.
paramidTypeIdMapis an object with the IdType code -> IdType Id from HealthCloud map.
paramaccountIdis a string with the Account Id.
return A HealthCloud Identifier object.
fun getRelatedPersontContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, contactId)
Converts the provided Contact FHIR object to the HealthCloud RelatedPerson contact-to-contact relationship of composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramrelationRoleMapthe role relationship map.
parammainContactIdis a string with the main Contact Id.
paramcontactIdis a string with the Contact Id.
return A composite HealthCloud contact-to-contact relationship request.
Util
A library with needed dataweave utility functions.
Source:
.src/main/resources/dwl/Util.dwl
Functions
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
objis an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arris an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arris an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
objis an object.
return An object with null values removed.